<script setup lang="ts">
import MessageContainer from '@/components/message-container/index.vue'
import { type MessageContainerExpose } from '@/components/message-container/types'
import { ref } from 'vue'

const message = ref<MessageContainerExpose | null>(null)
function sendMessage() {
  message.value?.insertMessage('123')
  message.value?.insertMessage('123', 'user')
  message.value?.changeMessage('321')
  console.log(message.value?.messageList)
}
</script>
<template>
  <div class="mess">
    <MessageContainer ref="message"></MessageContainer>
  </div>
  <button @click="sendMessage()">按钮</button>
</template>
<style lang="scss" scoped>
.mess {
  width: 500px;
  height: 500px;
  margin: 0 auto;
}
</style>
